package com.service.impl;

import com.mapper.SysMenuMapper;
import com.pojo.SysMenu;
import com.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysMenuServiceImpl implements SysMenuService {
    @Autowired
    private SysMenuMapper menuMapper;
    @Override
    public List<SysMenu> list(Integer page, Integer limit, String menuName, String menuType) {
        Integer begin=(page-1)*limit;
        return menuMapper.list(begin,limit,menuName,menuType);
    }

    @Override
    public int count(String menuName, String menuType) {
        return menuMapper.count(menuName,menuType);
    }

    @Override
    public int add(SysMenu menu) {
        return menuMapper.add(menu);
    }

    @Override
    public SysMenu view(Integer id) {
        return menuMapper.view(id);
    }

    @Override
    public int edit(SysMenu menu) {
        return menuMapper.edit(menu);
    }

    @Override
    public int del(Integer id) {
        return menuMapper.del(id);
    }
}
